from views.common.translator import Translator
from views.template_page_view import BasePageTemplateView, FormItemDto


class CommonSettingView(BasePageTemplateView):

    def __init__(self, parent=None):
        t = Translator()
        super().__init__("CommonSettingView", parent=parent)

        form_items = [
            FormItemDto("setting.stock.money.all", "name", "", "text"),
            FormItemDto("TushareToken", "age", "25", "int", form_min=18, form_max=100),
            FormItemDto(
                "Gender", "gender", "Male", "select", form_table="Male,Female,Other"
            ),
        ]

        # 添加一个报表
        self.addFromTemplate("基础配置表单", form_items)
